/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2023. All rights reserved
 */

 #ifndef BIDK_GETTID_H
 #define BIDK_GETTID_H

 #ifndef HAVE_CONFIG_H
 #include "config.h"
 #endif

 #include <asm/unistd.h>
 #include <sys/types.h>
 #include <unistd.h>

 #include "bidk_compiler.h"

 BIDK_BEGIN_C_DECLS

 /* Use own implementation of gettid */
 inline static pid_t bidk_gettid(void)
 {
    return syscall(__NR_gettid);
 }

 BIDK_END_C_DECLS

 #endif /* BIDK_GETTID_H */